package cn.liit.weixin.custommsg.model;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class NewsMsg extends BaseMsg{

	private Map<String,Object> news;

	public NewsMsg(String touser, List<Article> articles) {
		super(touser, MSGTYPE_NEWS);
		Map<String,Object> articlesMap = new HashMap<String, Object>();
		articlesMap.put("articles", articles);
		this.news = articlesMap;
	}

	public Map<String, Object> getNews() {
		return news;
	}

	public void setNews(Map<String, Object> news) {
		this.news = news;
	}
	
	public static class Article {

		private String title;
		private String description;
		private String url;
		private String picurl;
		
		public Article(String title, String description, String url, String picurl) {
			super();
			this.title = title;
			this.description = description;
			this.url = url;
			this.picurl = picurl;
		}
		public String getTitle() {
			return title;
		}
		public void setTitle(String title) {
			this.title = title;
		}
		public String getDescription() {
			return description;
		}
		public void setDescription(String description) {
			this.description = description;
		}
		public String getUrl() {
			return url;
		}
		public void setUrl(String url) {
			this.url = url;
		}
		public String getPicurl() {
			return picurl;
		}
		public void setPicurl(String picurl) {
			this.picurl = picurl;
		}
		
	}

}
